def Ez(m):
    for i in range(2, int(m**0.5)+1):
        if m%i==0:
            break
    else:
        return m 
s = 0
a = list(input().split())
b = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
for i in a:
    if i not in b:
        print('Wrong input')
        break
for j in range(10):
    if a[0]==b[j]:
        s = j*100
    if a[1]==b[j]:
        s = s + j*10
    if a[2]==b[j]:
        s = s + j
print(s)
